﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orid.Management.Statistics.Tools.Decomposition.Model;

namespace Orid.Management.Statistics.Tools.Decomposition.Data
{
    class ParentDataOnline : ParentData
    {
        //数据库连接地址
        string connectString;
        public ParentDataOnline(string dataDBAddress)
        {
               connectString = dataDBAddress;
        }
        public override List<ModelParentObject> GetParentDatas(Guid OrderId)
        {


            try
            {

                if (OrderId == null)
                {
                    return null;
                }
                List<ModelParentObject> listParentData = new List<ModelParentObject>();

                //[ParentObject]
                string tableName = "[FutureManagement_Stores].[FutureMa].[ParentDatas]";

                listParentData = GetParentDatas(OrderId, connectString, tableName);

                return listParentData;
            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                throw (new Exception(ex.Message));
            }


        }
    }
}
